package com.linwen.javase.基础;

import org.junit.Test;

/**
 * @ClassName _控制语句
 * @Description TODO
 * @Author zero
 * @DATE 2024/8/29 10:35 PM
 * @Version 1.0
 */
public class _控制语句 {

    @Test
    public void test() {
        label:
        for (int i = 0; i < 10; i++) {
            if (i < 5) {
                System.out.println(i);
            }
            break label;
        }
        System.out.println("end");
    }

    @Test
    public void test2() {
        label:
        for (int i = 0; i < 10; i++) {
            if (i < 5) {
                System.out.println(i);
            }
            continue label;
        }
        System.out.println("end");
    }
}
